---------------------------------------------------------------------- LOCKER API DLL v1.00 Demo Thank you for Trying LOCKER API DLL v1.00 WINDOWS. Please notify us if you encounter any problems with LOCKER API. You are allowed to use this DEMO of LOCKER API for 30 days. After 30 days you should either purchase LOCKER API or STOP USING the DEMO. This demo is for EVALUATION PURPOSES ONLY You are allowed to give/distribute this demo to anyone ONLY IF it has not been modified,is given with this documentation,is not bundled with comercial software and is FREE. We are interested in what you think about LOCKER API what additional feature you would like to see, what you don't like about it, and what you do like about it. Depending on what feedback I receive, additional features may be added ! ---------------------------------------------------------------------- Description: LOCKER API controls allows a programmer to control the number of concurrent users that may access their windows program. When someone tries to access the program when maximum number is being used, the program is notified and it is up to the program as to what happens - whether the program waits for a free license, exits, justs notifies that the software license is being exceeded, etc. ---------------------------------------------------------------------- Instructions for using LOCKER API DLL v1.00 DEMO FILES LIST readme.txt : This file LOCKAPIW.DLL: Metering DLL - This should go into your windows directory (or program directory) LOCKAPIW.LIB: Lib file for C programs LOCKAPIW.H: Include for C programs LOCKAPIW.DAT: Datafile used by DLL. Can be renamed. FUNCTIONS: LONG FAR PASCAL LOCKAPIW(WORD COMMAND,LPSTR LOCKERFILE,WORD MAX_LICENSE,DWORD FAR *LOCKERDATA); Description of Parameters: COMMAND - used to tell LOCKAPI what it should do LOCKERFILE - Complete path to where the LOCKAPIW.DAT file resides MAX_LICENSE -# of concurrent users to allow LOCKERDATA -storage for data the LOCKAPIW needs. Must not be modified or changed. WORD is the same as ainteger LPSTR is the same as a character far pointer DWORD is the same as a long LAN COMMANDS: This commands should be used for network version of your software. If the software is installed on a local drive - the user will be unable to run it unless share is loaded. Command: Value: Description -------------------------------------------------------------------- LKAPI_INIT_LAN 0 This initializes a metering session on a network. Must be called before any other metering commands. Returns 0 if ok, -1 if an error occurred LKAPI_DEINIT_LAN 1 This deinitializes a metering session. Returns 0 if ok, -1 if an error occurred LKAPI_METER_LAN 2 This sees if any licenses are available and meters one if possible Returns 0 if ok, -1 if no licenses are available LKAPI_FREE_LAN 3 This frees up a metered license Returns 0 if ok, -1 if an error occurred LKAPI_STATUS_LAN 4 This returns the # of active licenses Returns # of active licenses if ok, -1 if an error occurred a RETURN value of -99 indicates that an invalid command was used SINGLE COMMANDS: This commands should be used for standalone versions of your software. If the software is installed on a local drive - the user will be able to run it normally. However if it is installed on a network - only one user will be able to run it. Command: Value: Description -------------------------------------------------------------------- LKAPI_INIT_S 10 This initializes a metering session on a network. Must be called before any other metering commands. Returns 0 if ok, -1 if an error occurred LKAPI_DEINIT_S 11 This deinitializes a metering session. Returns 0 if ok, -1 if an error occurred LKAPI_METER_S 12 This sees if any licenses are available and meters one if possible Returns 0 if ok, -1 if no licenses are available LKAPI_FREE_S 13 This frees up a metered license Returns 0 if ok, -1 if an error occurred LKAPI_STATUS_S 14 This returns the # of active licenses. Returns 0 if the software is installed on a local drive and share is not loaded or the # of active licenses, -1 if an error occured. a RETURN value of -99 indicates that an invalid command was used LANGUAGE SPECIFIC: ---------------------------------------------------------------------- C : You should include the header file: "lockapiw.h" and have either a global or a static variable for the LOCKERDATA. The LOCKAPIW.LIB either needs to be linked in or you can add an IMPORTS statement in your DEF file IMPORTS LOCKERAPIW=LOCKERAPIW.LOCKERAPIW Example calls: LOCKAPIW(LKAPI_INIT_LAN,tempstr,1, &LOCKKEY); if (-1L==LOCKAPIW(LKAPI_METER_LAN,tempstr,1, &LOCKKEY)) { // no free licenses are available } ---------------------------------------------------------------------- Visual Basic to GLOBAL.BAS add the following lines: Declare Function LOCKAPIW Lib "LOCKAPIW.DLL" (ByVal lkcom%, ByVal lkfile$, ByVal lkcount%, LKFLAG&) As Integer Global LKFLAG As Long to initialize LOCKAPI use something like the following: LKFLAG& = 0 LKstr$ = "D:\LOCKAPIW\TEST.DAT" status = LOCKAPIW(10, LKstr$, 2, LKFLAG&) to meter a license: status = LOCKAPIW(12, LKstr$, 2, LKFLAG&) ---------------------------------------------------------------------- Other Languages: Lookup the instructions on how to access functions in DLLs (and then let us know so we can include the information in future releases) ---------------------------------------------------------------------- COMMON ERRORS: You get an error initializing or metering. Most likely the problem is that the filename you are passing is invalid, or is being passed wrong. The path given for the LOCKERFILE (LOCKAPIW.DAT) must be a valid DOS path - not a network specific path. FOR example: F:\METER\LOCKAPI.DAT is will work - where F: is a mapped network drive SERVER1/SYS:\METER\LOCKAPI.DAT will NOT work (even though NOVELL under stands it) USE IDEAS: You can store the license limit in a file and read it in before calling LOCKAPIW. This way you can easily upgrade a customers site for more licenses by just sending out a new file. It would be best to encyrpt the data (so they can't hack the license limits) ---------------------------------------------------------------------- The following licenses for LOCKER API DLL v1.00 are available: LOCKER API DLL v1.00: USD $ 245 + $5 royalty for each single license of software sold (S/H included) for the US & CANADA In Massachusetts please add 5% Sales Tax. We also offer Royalty free Application Licenses. Please contact us for a quote. We accept CHECKS, MONEY ORDERS, and Company PO's (call for approval) If you want more information on LOCKER API DLL or if you would like to purchase LOCKER API DLL v1.00 we can be contacted at: HAMPSHIRE SOFTWARE Box 216 300 Washington Street North Pembroke, MA 02358 (800)-NET-SOFT Compuserve Address: 72607, 3042 Dealer / Reseller inquires welcomed. And NOW for the usual disclaimers: NO OTHER WARRANTIES. HAMPSHIRE SOFTWARE disclaims all other warranties, either express or implied, including but not limited to implied warranties of mechantability and fitness for a particular purpose, with respect to the software, the accompanying written materials, and any accompanying hardware. This limited warranty gives you specific legal rights. You may have others, which vary from state to state. NO LIABILITY FOR CONSEQUENTIAL DAMAGES. In no event shall HAMPSHIRE SOFTWARE or its suppliers be liable for any damages whatsoever caused by the use of or inability to use this HAMPSHIRE SOFTWARE product. Because some states do not allow the exclusion or limitation of liability for consequential of incidental damages, the above limitation may not apply to you. ---------------------------------------------------------------------- ----------------end-of-author's-documentation--------------- Software Library Information: This disk copy provided as a service of Public (software) Library We are not the authors of this program, nor are we associated with the author in any way other than as a distributor of the program in accordance with the author's terms of distribution. Please direct shareware payments and specific questions about this program to the author of the program, whose name appears elsewhere in this documentation. If you have trouble getting in touch with the author, we will do whatever we can to help you with your questions. All programs have been tested and do run. To report problems, please use the form that is in the file PROBLEM.DOC on many of our disks or in other written for- mat with screen printouts, if possible. PsL cannot debug pro- programs over the telephone, though we can answer questions. Disks in the PsL are updated monthly, so if you did not get this disk directly from the PsL, you should be aware that the files in this set may no longer be the current versions. Also, if you got this disk from another vendor and are having prob- lems, be aware that some files may have become corrupted or lost by that vendor. Get a current, working disk from PsL. For a copy of the latest monthly software library newsletter and a list of the 4,000+ disks in the library, call or write Public (software) Library P.O.Box 35705 - F Houston, TX 77235-5705 1-800-2424-PSL MC/Visa/AmEx/Discover Outside of U.S. or in Texas or for general information, Call 1-713-524-6394